CreateRootControl
NEW WITH THE APPEARANCE MANAGER
Creates the root control for a specified window.
pascal OSErr CreateRootControl ( WindowPtr inWindow, ControlHandle* outControl);
inWindow
- On input, a pointer to the window in which you wish to create a root control.
outControl
- On output, a pointer to a handle to the root control.
- function result
- A result code; see "Result Codes". The result code
errControlsAlreadyExist
indicates that other controls were already present whenCreateRootControl
was called. The result codeerrRootAlreadyExists
indicates that a root control was already created for the window.DISCUSSION
TheCreateRootControl
function creates the root control for a window if no other controls are present. If there are any controls in the window prior to callingCreateRootControl
, an error is returned and the root control is not created.The root control acts as the top-level container for a window and is required for embedding to occur. Once the root control is created, you can call
EmbedControl
andAutoEmbedControl
to embed controls in the root control.
- Note
- The minimum, maximum, and initial settings for a root control are reserved and should not be changed.
![]()
SEE ALSO
"Embedding Controls"."Appearance Manager Gestalt Selector Constants".